package com.MovieManageSystem.domain;
import jakarta.persistence.CascadeType;
import jakarta.persistence.OneToMany;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 影视实体类
 */


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Movie {
    private Long vid;
    private String vTitle;
    private String vImg;
    private Double score;
    private String classify;
    private String protagonist;
    private String description;
    private String vUrl;

    @OneToMany(mappedBy = "movie", cascade = CascadeType.ALL, orphanRemoval = true)
    private List<Comment> comments;
}
